package in.antany.eclipse.file.handler.helper;

public class BuildCopyRule {
	private String srcFolder;
	private String tgtFolder;
	private String fileType;
	private String copyType;
	private String classFolder;
	private String jarFile;
	
	private boolean javaFile;
	private boolean sjarFile;
	
	public boolean isJavaFile(){
		return javaFile;
	}

	public boolean isJarFile(){
		return sjarFile;
	}

	enum FileType {
		NON_JAVA("non-java"), JAVA("java");

		private String value;

		FileType(String value) {
			this.value = value;
		}

		String getValue() {
			return value;
		}
	}

	enum CopyType {
		FOLDER("folder"), JAR("jar");

		private String value;

		CopyType(String value) {
			this.value = value;
		}

		String getValue() {
			return value;
		}
	}

	public String getSrcFolder() {
		return srcFolder;
	}

	public void setSrcFolder(String srcFolder) {
		this.srcFolder = srcFolder;
	}

	public String getTgtFolder() {
		return tgtFolder;
	}

	public void setTgtFolder(String tgtFolder) {
		this.tgtFolder = tgtFolder;
	}

	public String getFileType() {
		return fileType;
	}

	public void setFileType(String fileType) {
		if(FileType.JAVA.getValue().equals(fileType)){
			javaFile = true;
		}else{
			javaFile = false;
		}
		this.fileType = fileType;
	}

	public String getCopyType() {
		return copyType;
	}

	public void setCopyType(String copyType) {
		if(CopyType.JAR.getValue().equals(copyType)){
			sjarFile = true;
		}else{
			sjarFile = false;
		}
		this.copyType = copyType;
	}

	public String getClassFolder() {
		return classFolder;
	}

	public void setClassFolder(String classFolder) {
		this.classFolder = classFolder;
	}

	public String getJarFile() {
		return jarFile;
	}

	public void setJarFile(String jarFile) {
		this.jarFile = jarFile;
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return srcFolder + "-->" + tgtFolder + "-->" + fileType + "-->"
				+ copyType + "-->" + classFolder+"-->"+jarFile;
	}

}
